<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登陆页</title>
</head>
<body>
<div>
    <form action="/login" method="post">
        <h2>登陆页</h2>
        <h6>账号：admin,密码：123456</h6>
        <!--       验证码获取 -->
        <img style="width: auto;height: 100px" src="/getCode"/>
        <br/>
        <label for="username">账号：</label><input style="margin-left: 17px" type="text" id="username" name="username"
                                                placeholder="admin">
        <br/>
        <label for="password">密码：</label><input style="margin-left: 17px" type="password" id="password" name="password"
                                                placeholder="123456">
        <br/>
        <label for="code">验证码：</label><input type="text" id="code" name="code" placeholder="">
        <br/>
        <br/>
        <button type="submit">登陆</button>
        <div th:if="${param.captchaInvalid}" style="color: red;">
            验证码错误.
        </div>
        <div th:if="${param.error}" style="color: red;">
            账号或密码错误.
        </div>
        <div th:if="${param.logout}" style="color: red;">
            登录失效.
        </div>
    </form>
</div>
</body>
</html>